//
//  SMyFuTableViewCell.m
//  News
//
//  Created by dlios on 15-5-22.
//  Copyright (c) 2015年 PEAK. All rights reserved.
//

#import "SMyFuTableViewCell.h"

@implementation SMyFuTableViewCell

- (void)dealloc
{
    [_MyImage release];
    [_MyLabel release];
    [_sw release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        //self.MyImage = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"oYYBAFQGu0qIfMorAAXEOpX9b2oAAB5iwGe0lQABcRS288"]] autorelease];
        self.MyImage = [[[UIImageView alloc] init] autorelease];
        [self.contentView addSubview:_MyImage];
        _MyImage.userInteractionEnabled = YES;
        self.MyLabel = [[[UILabel alloc] init] autorelease];
        [self.contentView addSubview:_MyLabel];
        self.sw = [[[UISwitch alloc]init] autorelease];
        self.sw.onTintColor = [UIColor redColor];
        [self.contentView addSubview:_sw];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.MyImage.frame = CGRectMake(0, 10, 40 ,self.contentView.frame.size.height- 20);
    
    self.MyLabel.frame = CGRectMake(_MyImage.frame.origin.x + 50, self.contentView.frame.size.height / 3, 90, 20);
    
    self.sw.frame = CGRectMake(_MyLabel.frame.origin.x + self.contentView.frame.size.width / 1.5, _MyLabel.frame.origin.y - 5, 60, 20);
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
